<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Message 消息提示</title>
    <!-- 引入ElementUI样式 -->
    <link rel="stylesheet" href="element-ui/index.css">
</head>
<body>
<div id="app">
    <el-button @click="show1" type="info">消息</el-button>
    <el-button @click="show2" type="success">成功</el-button>
    <el-button @click="show3" type="warning">警告</el-button>
    <el-button @click="show4" type="danger">错误</el-button>

    <el-button @click="show5" type="primary">主要消息</el-button>
    <el-button @click="show6" type="text">文本</el-button>
</div>

<!-- 先引入vue -->
<script src="js/vue.js"></script>
<!-- 再引入ElementUI组件库 -->
<script src="element-ui/index.js"></script>
<script>
    new Vue({
        el: '#app',
        methods: {
            show1() {
                this.$message('这是一条普通消息');
            },
            show2() {
                this.$message.success("这是一条成功消息");
            },
            show3() {
                this.$message.warning("这是一条警告消息");
            },
            show4() {
                this.$message.error('这是一条错误消息');
            },
            show5(){
                this.$message("这是一条primary主要信息");
            },
            show6(){
                this.$message("这是一条text文本信息");
            }
        }
    });
</script>
</body>
</html>